home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5832 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: news.corp.hp.com!news
  2. From: Earl Chew <earl@hpato.aus.hp.com>
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: Performance: C vs. C++
  5. Date: Wed, 07 Feb 1996 11:59:44 +1100
  6. Organization: Hewlett-Packard Co.
  7. Message-ID: <3117F980.7890@hpato.aus.hp.com>
  8. References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net> <4dnpl2$c8g@classic.iinet.com.au> <3105E9DC.1BE3@enermet.fi> <DLr46y.7rH@txnews.amd.com> <4elk5l$3f2q@yuma.ACNS.ColoState.EDU> <pronet01.31.003EB1E6@indirect.com>
  9. NNTP-Posting-Host: hpautorb.aus.hp.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6a (X11; I; HP-UX A.09.05 9000/715)
  14.  
  15. Mark Miller wrote:
  16. > 2 people told me in the past that C++ sucked because it was too slow and
  17. > when I looked at their programs, I noticed that they did not pass by reference
  18. > to methods (which always invokes constructors and destructors in addition
  19. > to stack operations), and that they ended up calling member functions inside of
  20. > for-loops;
  21.  
  22. Agreed. C++ makes a lot of things easy to do including:
  23.  
  24. 1. Passing large objects by value.
  25. 2. Creating temporary objects as a result of silent conversions.
  26. 3. Creating new code as a result of template instantiation.
  27.  
  28. It's very easy to build large programs that require lots of memory and
  29. that run very slowly.
  30.  
  31. Earl
  32. -- 
  33. +----------------------------------------------------------------------+
  34. | Earl Chew                               Email: earl_chew@aus.hp.com  |
  35. | Hewlett-Packard Australia Ltd           Tel:   +61 3 9210 5528       |
  36. | Australian Telecom Operation            Fax:   +61 3 9210 5550       |
  37. | 347 Burwood Highway                     GPS:   37 48'44"S 145 8'51"E |
  38. | Burwood East, Victoria 3151, Australia                               |
  39. +----------------------------------------------------------------------+
  40.